<template>
  <!-- 文件上传 -->
  <div>
    <el-form-item label="流程选择：">
      <el-select
        v-model="uploadProcessType"
        size="small"
        placeholder="请选择"
        style="width: 200px"
        @change="value => $emit('onChangeProcess', value)"
      >
        <el-option label="材料审批" value="材料审批" />
        <el-option label="值班审批" value="值班审批" />
      </el-select>
    </el-form-item>
    <el-form-item label="上报描述：">
      <el-input v-model="reportDesc" maxlength="100" placeholder="请输入" />
    </el-form-item>

    <el-upload
      drag
      multiple
      action=""
      :on-change="handleChange"
      :on-remove="handleRemove"
      :file-list="fileList"
      :auto-upload="false"
      style="width: 100%; margin: 22px 0 10px"
    >
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
    </el-upload>
  </div>
</template>

<script>
export default {
  name: "UploadApprovalForm",
  data() {
    return {
      reportDesc: "",
      uploadProcessType: '材料审批',
      fileList: [],
    };
  },
  methods: {
    handleChange(file, fileList) {
      this.fileList = fileList;
    },
    handleRemove(file, fileList) {
      this.fileList = fileList;
    },
  },
};
</script>

<style>
</style>